package com.datang.petstore.service.impl;

import com.datang.petstore.entity.MicroblogLabel;
import com.datang.petstore.generatemapper.MicroblogLabelMapper;
import com.datang.petstore.mapper.MicroblogLabelCustomMapper;
import com.datang.petstore.service.MicroblogLabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-11-01 14:15
 * @notify 标签接口
 * @version 1.0
 */
@Service
public class MicroblogLabelServiceImpl implements MicroblogLabelService {

    @Autowired
    private MicroblogLabelCustomMapper microblogLabelCustomMapper;


    @Transactional
    public void addLabels(List<MicroblogLabel> labels){
        //添加标签
        microblogLabelCustomMapper.addLabel(labels);
    }



    public List<String> getHotMicroblogLabel(){
        return microblogLabelCustomMapper.hotMicroblogLabel();
    }
}
